package models;

import play.data.validation.Required;
import siena.Id;
import siena.Model;

/**
 * @author oleksandr.bezhan oleksandr.bezhan@d8corp.com
 * 
 *         06.05.2012
 */
public class Ingredient extends Model {
    public enum Unit {
        GLASS,
        GRAM,
        NONE,
        PCS,
        TABLESPOON,
        TEASPOON
    }

    @Required
    public float count;

    @Id
    public Long id;
    @Required
    public Product product;
    @Required
    public Recipe recipe;
    @Required
    public Unit unit;

    @Override
    public String toString() {
        return "Ingredient [count=" + this.count + ", id=" + this.id + ", product=" + this.product + ", recipe="
                        + this.recipe + ", unit=" + this.unit + "]";
    }
}
